package global

type (
	PartitionNameRulesS struct {
		Name        string `json:"PartName"` //分区名
		Seq         string `json:"Seq"`      //分区序号
		SubSum      string `json:"subSum"`   //分区数量
		Rules       string `json:"Rules"`    //分区规则
		Distributed string //数据分布
	}
	PartMethS struct {
		FirPartMeth string //一级分区方式
		SubPartMeth string //二级分区方式
	}
	PartSumS struct {
		FirPartSum string //一级分区数量
		SubPartSum string //子分区数量
	}
	PartFuncS struct {
		FirPartFunc []string //一级分区函数
		SubPartFunc []string //二级分区函数
	}
	PartColS struct {
		FirPartCol []string //一级分区列
		SubPartCol []string //二级分区列
	}
	PartColTS struct {
		FirPartColType []string //一级分区列
		SubPartColType []string //二级分区列
	}
	PartColCS struct {
		FirPartColChart     []string //一级分区列
		FirPartColCollation []string //一级分区列
		SubPartColChart     []string //二级分区列
		SubPartColCollation []string //一级分区列
	}
	PartRuleS struct {
		FirPartRules []PartitionNameRulesS //一级分区
		SubPartRules []PartitionNameRulesS
	}
	PartOverviewS struct {
		Status          bool //是否是分区表，true为分区表
		ShardModeStatus bool //shard模式是否为分区表，true为分区表
		PartRuleS       PartRuleS
	}
	PartDefinitionS struct {
		Meth      PartMethS
		PartSumS  PartSumS
		PartFuncS PartFuncS
		PartColS  PartColS
		PartColT  PartColTS
		PartColC  PartColCS
	}

	//各个数据库查询分区返回的结果
	PartMetaResultS struct {
		Overview   PartOverviewS
		Definition PartDefinitionS
		Rules      PartRuleS
		NameGarth  []string
		Shard      []PartShardS
	}
	//获取各个数据库的每个partName对应的shard分布和对应的后端表名
	PartShardS struct {
		Mode             string
		PartName         string
		SubPartName      string
		ShardName        string
		BackendTableName string
	}
	PartMetaMarge struct {
		Name         []string
		Logo         string //是分区表还是normal
		SrcPartShard []PartShardS
		DstPartShard []PartShardS
	}
)
